﻿using System;
using Jayden.Dll.Web.Enums;
using Jayden.Dll.Web.HtmlControls.Descriptions;
using Jayden.Dll.Web.HtmlControls.Generics;
using Jayden.Dll.Web.HtmlControls.Interfaces;

namespace Jayden.Dll.Web.HtmlControls
{
	public class Details : HtmlElement, WithOpen
	{
		public Details() : base(DetailsDescription.Instance) { }

		public bool Open { get { return GetAttributeBool("open"); } set { SetAttribute("open", value); } }
	}
	public class DetailsDescription : HtmlElementDescription
	{
		public static readonly DetailsDescription Instance = new DetailsDescription();
		private DetailsDescription() : base("details", HtmlVersion.Html5) { }
		public override string Description { get { return "control from which the user can obtain additional information or controls on-demand."; } }
		public override Type ControlType { get { return typeof(Details); } }
		public override bool IsFlowElement { get { return true; } }
	}
}
